package PenTest.eleme.ACM0412;

import java.util.HashSet;
import java.util.Scanner;

public class ACM3 {
    public static void main(String[] args) {
        //质数和合数的总计只需要统计大于1的单独的数的集合即可
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String[] line = sc.nextLine().split(" ");
        HashSet<Integer> set = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            int x = Integer.parseInt(line[i]);
            if (x > 1) {
                set.add(x);
            }
        }
        System.out.println(set.size());
    }
}
